package com.zmsk.zmio.handler;

import android.content.Context;

import com.softwinner.Gpio;
import com.zmsk.zmio.inter.IIOHandler;

public class ZCHandler implements IIOHandler {

    public ZCHandler() {
        Gpio.setMulSel('O', 2, 1);
        Gpio.setMulSel('O', 4, 1);
    }

    @Override
    public void initIOControl(Context context) {

    }

    @Override
    public void stopIOControl(Context context) {

    }

    @Override
    public void noticeGateOpen(Context context, String idNumber) {
        Gpio.writeGpio('O', 2, 1);
    }

    @Override
    public void noticeGateClose(Context context) {
        Gpio.writeGpio('O', 2, 0);
    }

    @Override
    public void noticeWhiteLedOn(Context context) {
        Gpio.writeGpio('O', 4, 1);
    }

    @Override
    public void noticeWhiteLedOff(Context context) {
        Gpio.writeGpio('O', 4, 0);
    }

    @Override
    public void noticeInfraredLedOn(Context context) {

    }

    @Override
    public void noticeInfraredLedOff(Context context) {

    }

    @Override
    public void noticeRedLedOn(Context context) {

    }

    @Override
    public void noticeRedLedOff(Context context) {

    }

    @Override
    public void noticeGreenLedOn(Context context) {

    }

    @Override
    public void noticeGreenLedOff(Context context) {

    }

    @Override
    public void handleSlientInstall(String path) {

    }
}
